import { axios } from '@/utils/request'

const api = {
  dvUnitType: 'qiyu/unit/type'
}

export function getDvUnitTypeList (parameter) {
  return axios({
    url: api.dvUnitType + '/list',
    method: 'get',
    params: parameter
  })
}

export function saveDvUnitType (parameter) {
  return axios({
    url: api.dvUnitType + (parameter.id > 0 ? '/update' : '/save'),
    method: 'post',
    data: parameter,
    headers: {
      'Content-Type': 'application/json;charset=UTF-8'
    }
  })
}

export function delDvUnitType (parameter) {
  return axios({
    url: api.dvUnitType + '/remove',
    method: 'post',
    params: parameter
  })
}

export const dvUnitTypeExport = api.dvUnitType + '/export'
